{include file='../header.tpl'}

<div class="container">
    {if sizeof($usersLatestPosts) == 0}<h1 class="left-padding">{$theUser->getName()} {$genders[$theUser->getGender()]} pagina met NULL posts!</h1>

    {else}
    <h1 class="left-padding ">{$theUser->getName()} {$genders[$theUser->getGender()]} pagina. Laatste POSTS:</h1>
    <div class="left-padding karikatuur">
        <div id="slideshow">
        {foreach from=$usersLatestPosts item=post}
            <a {if $post@index == 0}class="active"{/if} href="/post/read/{$post->getId()}">
                <p class="bigfont">{substr(strip_tags($post->getTitle()), 0, 90)}</p>
            </a>
        {/foreach}
        </div>
    </div>

    {/if}

    <h1 class="left-padding bottom-marginat0r">{$theUser->getName()} is meestal <i>{if $usersPostRatings>0}positief{elseif $usersPostRatings<0}negatief{else}neutraal{/if}</i> over de berichtgeving
        en over het algemeen <i>{if $usersCommentRatings>0}positief{elseif $usersCommentRatings<0}negatief{else}neutraal{/if}</i> over de commentaren</h1>


    {if sizeof($usersLatestComments) == 0}<h1 class="left-padding">{$theUser->getName()} heeft nog nooit wat gezegd... :(</h1>
    {else}
    <h1 class="left-padding">{$theUser->getName()} zei:</h1>

    <div class="left-padding row bottom-marginat0r">
    {foreach $usersLatestComments as $comment}
        <span class="span4 postblock">
            <a href="/post/read/{$comment->getPost()->getId()}">
                <p><i>{substr(strip_tags($comment->getCommentText()), 0,300)}</i></p>
                <p>op <b>{$comment->getPost()->getTitle()}</b></p>
            </a>
        </span>
        {if $comment@iteration % 3 == 0 }<div class="clearme"></div>{/if}
    {/foreach}
    </div>
    {/if}

    {if sizeof($usersCategorySubscriptions) == 0 && sizeof($usersChannelSubscriptions) == 0}
        <h1 class="left-padding">Daarnaast is {$theUser->getName()} nergens lid van! :o</h1>

    {elseif sizeof($usersCategorySubscriptions) != 0}
        <h1 class="left-padding">Daarnaast is {$theUser->getName()} lid van:</h1>
    {/if}

    <div class="left-padding row bottom-marginat0r">
    {foreach $usersCategorySubscriptions as $category}
        <span class="span4 postblock">
            <a href="/category/{$category->getName()}">
                <h2 class="hoverme">{$category->getName()}</h2>
            </a>
        </span>
        {if $category@iteration % 3 == 0 }<div class="clearme"></div>{/if}
    {/foreach}
    </div>

    {if sizeof($usersCategorySubscriptions) == 0 && sizeof($usersChannelSubscriptions) != 0}
        <h1 class="left-padding">Daarnaast is {$theUser->getName()} lid van:</h1>

        {elseif sizeof($usersChannelSubscriptions) != 0}

        <h1 class="left-padding">En ook van:</h1>
    {/if}


    <div class="left-padding row bottom-marginat0r">
    {foreach $usersChannelSubscriptions as $channel}
        <span class="span4 postblock">
            <a href="/channel/view/{str_replace(',', '_', str_replace(' ', '-', $channel->getName()))}">
                <h2 class="hoverme">{$channel->getName()}</h2>
            </a>
        </span>
        {if $channel@iteration % 3 == 0 }<div class="clearme"></div>{/if}
    {/foreach}
    </div>
{include file='../footer.tpl'}